<?php
// +----------------------------------------------------------------------
// | UCToo [ Universal Convergence Technology ]
// +----------------------------------------------------------------------
// | Copyright (c) 2014-2015 http://uctoo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: UCT <contact@uctoo.com>
// +----------------------------------------------------------------------

namespace app\mpopen\model;
use think\Model;

class Component extends Model{
    private $token = null;
    private $encodingAesKey = null;
    private $appid = null;
    private $appsecret = null;

    /*
     * 获取comtoken
     * */
    public function get_component_token(){

        $where['appid']= config('COMPONENT_APPID');
        $data = $this ->where($where)->find();
        if($data){
            return $data['component_access_token'];
        }else{
            trace($this->getlastsql());
        }
    }


}